﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication
{
    public class AbstractObjectClass
    {
        public int iCount;      //      *protected int iCount; 在派生类无法访问。

        string name_;
        public string Name
        {
            get { return name_; }
            set { name_ = value; }
        }

        public virtual void ShowName()      //      *protected virtual void ShowName() 在派生类无法被重写。
        {
            Console.WriteLine("AbstractObjectClass's name is {0}.", Name);
        }

        protected virtual void ShowName(string name)
        {
            Console.WriteLine("AbstractObjectClass's name is {0}.", name);
        }



    }
}
